package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.KingBdCangwMapper;
import com.ruoyi.system.domain.KingBdCangw;
import com.ruoyi.system.service.IKingBdCangwService;

/**
 * 仓位Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-26
 */
@Service
public class KingBdCangwServiceImpl implements IKingBdCangwService 
{
    @Autowired
    private KingBdCangwMapper kingBdCangwMapper;

    /**
     * 查询仓位
     * 
     * @param id 仓位ID
     * @return 仓位
     */
    @Override
    public KingBdCangw selectKingBdCangwById(Long id)
    {
        return kingBdCangwMapper.selectKingBdCangwById(id);
    }

    /**
     * 查询仓位列表
     * 
     * @param kingBdCangw 仓位
     * @return 仓位
     */
    @Override
    public List<KingBdCangw> selectKingBdCangwList(KingBdCangw kingBdCangw)
    {
        return kingBdCangwMapper.selectKingBdCangwList(kingBdCangw);
    }

    /**
     * 新增仓位
     * 
     * @param kingBdCangw 仓位
     * @return 结果
     */
    @Override
    public int insertKingBdCangw(KingBdCangw kingBdCangw)
    {
        return kingBdCangwMapper.insertKingBdCangw(kingBdCangw);
    }

    /**
     * 修改仓位
     * 
     * @param kingBdCangw 仓位
     * @return 结果
     */
    @Override
    public int updateKingBdCangw(KingBdCangw kingBdCangw)
    {
        return kingBdCangwMapper.updateKingBdCangw(kingBdCangw);
    }

    /**
     * 批量删除仓位
     * 
     * @param ids 需要删除的仓位ID
     * @return 结果
     */
    @Override
    public int deleteKingBdCangwByIds(Long[] ids)
    {
        return kingBdCangwMapper.deleteKingBdCangwByIds(ids);
    }

    /**
     * 删除仓位信息
     * 
     * @param id 仓位ID
     * @return 结果
     */
    @Override
    public int deleteKingBdCangwById(Long id)
    {
        return kingBdCangwMapper.deleteKingBdCangwById(id);
    }

    @Override
    public int getNum(String fCode){ return kingBdCangwMapper.getNum(fCode);}

    @Override
    public List<KingBdCangw> scodeTo(String scode){ return kingBdCangwMapper.scodeTo(scode);}

    @Override
    public String fIdtoName(String fId){ return  kingBdCangwMapper.fIdtoName(fId);}

    @Override
    public Map<String, String> fIdToMap(String fId){return  kingBdCangwMapper.fIdToMap(fId);}
}
